package xyz.yohao.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import xyz.yohao.flow.common.constants.EntityConstants;

import java.io.Serializable;
import java.util.Date;

@Data
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
     * 主键id
     */
    @TableId
    public Long id;

    /**
     * 是否删除
     */
    public Integer isDeleted;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = EntityConstants.ENTITY_TIME_FORMAT)
    public Date createTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = EntityConstants.ENTITY_TIME_FORMAT)
    public Date updateTime;

    /**
     * 租户id
     */
    public Long tenantId;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 更新者
     */
    private String updateBy;
}
